Skip to content

test(ListInput): the first-record mouse-drop case holds the animation clock across the release - #13778

Merged
cixzhang merged 1 commit into
mainfrom
fix/listinput-first-record-glide-test-clock
Nov 25, 2026
Merged

cixzhang merged 1 commit into
mainfrom
fix/listinput-first-record-glide-test-clock

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Contributors and the release check see ListInputReorder.a11y.chromium.spec.ts ("a mouse drop that moves the first record › starts each moved record's glide where its fields were shown…") fail now and then on main: a record's field measured 2.13 px from where it was shown, against a 2 px bound. No product behavior changes; this fixes the test.

Problem and solution fit

  • The glide starts at the drop and runs on the page's animation clock (Web Animations).
  • The case read the fields' tops in an animation frame after the release. On a loaded runner one or more frames pass first, so the glide has already moved the fields about 2 px.
  • The page's animation clock now stands still (Chrome DevTools Protocol Animation.setPlaybackRate 0) from just before the release until the tops are read, then runs again. The read sees the glide's first frame every run.
  • The 2 px bound is unchanged.

Expected behavior and authority

A moved record's glide starts where its fields were shown, also when the record gains or loses the column labels (the drop glide; spec:AST-094 FR43, FR45).

Smallest restoration

One case in packages/lab/src/ListInput/__tests__/ListInputReorder.a11y.chromium.spec.ts: three CDP calls around the release and the read.

Evidence

Chromium 149, one worker, no retries, on a quiet machine:

  • Red at main: with a 50 ms wait forced between page.mouse.up() and the read, main's case failed 3 of 3 (7.68, 9.98 and 7.22 px against the 2 px bound). The same wait with this case passed 3 of 3. This case as committed passed 10 of 10. (main as committed passed 10 of 10 on that machine; CI's 2.13 px needs a loaded runner.)
  • The product's glide starts where the fields were shown (real browser, main): a real mouse drags the first record's handle 150 px down and releases with the animation clock slowed to a tenth. Each moved record's first field is at the same place in the last frame before the release and in the glide's first frame (391 → 391, 471 → 471, 501 → 501 px): 0 px in 6 of 6 takes, at a tenth and at full speed. At full speed the glide's first frame moves the fields 2.3 to 3.1 px, so a read one frame late passes the 2 px bound, as on CI. The test was fragile, not the product.
  • The bound: unchanged at 2 px.

Overlap checked: #11720 (it changes ListInput's stories and other cases in this file; this changes one case that fails on main now, so it lands on its own)

Scope

Components: ListInput (Lab), test only

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • playwright test ListInputReorder.a11y.chromium.spec.ts -g "glide where its fields were shown" (Chromium, --retries=0 --workers=1): 10 of 10 at this head, and 3 of 3 with a forced 50 ms wait between the release and the read (main: 0 of 3 with that wait).

… clock across the release

The glide starts at the drop and runs on the page's animation clock. The
case read the fields' tops in a frame after the release, so on a loaded
runner the glide had already moved them about 2 px. The page's animation
clock now stands still from just before the release until the tops are
read, so the read sees the glide's first frame every run. The 2 px bound
is unchanged.

Co-authored-by: ernestt <ernestt@users.noreply.github.com>
@vercel

vercel Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 25, 2026 9:27am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 25, 2026
@astracat-bot

astracat-bot Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 25, 2026, 10:19 AM UTC

@cixzhang cixzhang added the ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) label Nov 25, 2026
@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 270a3da

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
lab/ListInput · Storybook 100.4 kB (0) · 1.3 kB CSS (0) 1,273 (0) — · ✓ · —

Package size: no published package changed; no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: holding the page's animation clock still across the release makes the first-record mouse-drop case read the glide's first frame on every run, which removes the timing dependence behind its failure on main. The case passed in this head's CI, and the 2 px bound and the rest of the spec are unchanged. Nothing is required before merge; two optional points:

  • The description's Evidence and Testing sections are still placeholders; this head's passing CI run of the case could fill them.
  • #13762 moves this spec to packages/core/src/ListInput/__tests__/; whichever of the two lands second should check that the moved file keeps the freeze.
Claims and files checked

Review mode: same-head; reason: none

changed rules (0): none

  • Claim: the case fails now and then on main — verified: main's CI failed exactly this case on 2026-11-25, its shard's only failure; the measured distance could not be checked.
  • Claim: no product behavior changes, test only — verified: one test file changes, 8 lines added.
  • Claim: the glide starts at the drop and runs on the page's animation clock — verified: the drop's rebase starts each moved row's spring at the drop's time (listReorderEngine.tsx:2061, :2110, :2115) as keyframe animations (animator.ts:2137-2146).
  • Claim: the case read the tops in an animation frame after the release — verified: fieldTops reads in requestAnimationFrame (:212-231) right after page.mouse.up() (:263-264).
  • Claim: on a loaded runner frames pass first and the glide has moved the fields about 2 px — consistent: the settle spring (0.5 s, no bounce) moves a row about 2% of its shift in the first frame and about 7% by the second.
  • Claim: the clock stands still from just before the release until the tops are read, then runs again — verified: :260-265.
  • Claim: the read sees the glide's first frame every run — verified from the code: the glide's animations fill both ways and are retired only when their own time reaches the end (animator.ts:2143, :2239-2246); the case passed on its first attempt in this head's CI.
  • Claim: the 2 px bound is unchanged — verified: :271.
  • Claim: a moved record's glide starts where its fields were shown, under the touch-presentation record's FR43 and FR45 — verified: both requirements are current and cover a mouse drop's spring; the column-label case is the engine's handle-inset offset (listReorderEngine.tsx:2069-2075).
  • Claim: one case, three DevTools Protocol calls around the release and the read — verified: :261, :262, :265, with the session opened at :260.
  • Claim: overlap with #11720 checked — verified: #11720 edits the stories and the record-columns case, not this one.
  • Claim: ListInput (Lab) only, with no new public API, visual change, default or interaction model, and no internal context in public text — verified.
  • File: packages/lab/src/ListInput/__tests__/ListInputReorder.a11y.chromium.spec.ts — clear.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 25, 2026 09:53
@cixzhang
cixzhang merged commit ac3e9a5 into main Nov 25, 2026
147 checks passed
@github-actions
github-actions Bot deleted the fix/listinput-first-record-glide-test-clock branch November 26, 2026 06:04
@ernestt ernestt mentioned this pull request Nov 30, 2026
4 tasks done

This branch was successfully deployed

1 active deployment
Preview — 270a3dae Deployed Nov 25, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant